package edu.pku.taas.hyperic.types2;

import com.thoughtworks.xstream.XStream;

import edu.pku.taas.hyperic.monitor.LogConfigure;

public class TestSerialization {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		LogConfigure.setUp();
		
		XStream xstream = new XStream();		
		xstream.alias("Resource", MonitorableResource.class);
		
		MonitorableResource resource = new MonitorableResource();
		resource.setDescription("resource 1");
		resource.setId(10011);
		resource.setName("TestResource1");
		resource.setResourcePrototypeId(12001);
		resource.setResourcePrototypeName("child resource");
		
		String rps = xstream.toXML(resource);
		System.out.println(rps);
	}

}
